import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/jsonserialize/im/contact.dart';
import 'package:im_flutter_sdk_example/utils/global.dart';

class Easymob with ChangeNotifier {
  Contact _contact;
  Contact get contact => _contact;

  void reqContacts() async {
    var result = await G.req.im.contactList();
    ContactData contactData = ContactData.fromJson(result.data);
    if (contactData.status == 1) {
      _contact = contactData.contacts[0];
    }
  }
}
